<!--tvm票款差异协查-->
<template>
  <div class="zhanNeiRYDLCK approve el-card is-always-shadow el-card__body">
    <el-dialog
      title="预览"
      :visible.sync="dialogVisible"
      @close="closed"
      width="950px">
      <avue-form v-if="isReload" class="shouPiaoYuanCYQRTZForm" :option="option" v-model="formData" @submit="handleSubmit">

        <template slot-scope="scope" slot="recordTime">
          <span>{{moment(scope.value).format('YYYY-MM-DD')}}</span>
        </template>
        <template slot-scope="scope" slot="conductorPersonName">
          <span>{{scope.value}}</span>
        </template>
        <template slot-scope="scope" slot="conductorPersonCode">
          <span>{{scope.value}}</span>
        </template>
        <template slot-scope="scope" slot="differenceAmount">
          <span>{{fenExYuangettoFixed(scope,'value')}}</span>
        </template>

        <template slot-scope="scope" slot="menuForm">
          <!-- <el-button type="primary" @click="handleSubmit(2)">确认</el-button> -->
          <el-button type="default" @click="closed">取消</el-button>
        </template>
      </avue-form>
    </el-dialog>
  </div>
</template>


<script>
  import {
    fenExYuangettoFixed
  } from "../../../../../../api/subwayRat/commonCheck";
  import moment from 'moment';
  export default {
    components:{
    },
    data() {
      return {
        isReload:true,
        //1期限内，2期限外
        showType:1,
        dialogVisible:true,
        lineCodes:[],
        selectedKeys:[],
        stationCodes:[],
        conductorPersonNames:[],//售票员名称
        operationCodes:[],
        headers:{},
        formData:{
          dynamic: []
        },
        option:{
        },
        parentThis:null
    }
    },
    created() {
    },
    methods: {
      moment,
      fenExYuangettoFixed,
      handleSubmit(auditSate){
        this.closed();
      },
      recallShow(row,parentThis){
        this.parentThis=parentThis;
        this.formData=row;
        this.showType = row.appealType;
        this.getOption();
      },
      closed(){
        this.dialogVisible=false;
        this.$parent.prevDialogVisible=false;
      },
      getOption(){
        let th=this;
        this.option=this.getAddOption(th);
        this.isReload=false;
        this.$nextTick(()=>{
          this.isReload=true;
        })
      },

      getAddOption(th) {
        return {
          submitBtn:false,
          emptyBtn:false,
          group:[
            {
              icon:'',
              label: '',
              // collapse:false,
              prop: 'group1',
              column: [
                {
                  type: 'select',
                  label: '站点',
                  prop: 'stationCode',
                  labelWidth:130,
                  props: {
                    label: 'name',
                    value: 'code'
                  },
                  dicFlag: true,
                  disabled:true,
                  dicUrl: `/support/swparamstation/dict/9`,
                },
                {
                label: '售票员',
                prop: 'conductorPersonName',
                labelWidth:130,
                formslot:true,
                type:'select'
              },{
                label: '售票员工号',
                prop: 'conductorPersonCode',
                labelWidth:130,
                formslot:true,
                type:'select'
              },
                {
                  label: '设备操作号',
                  prop: 'equipmentNumber',
                  disabled:true,
                  labelWidth:130
                },
                {
                label: '收入日期',
                prop: 'recordTime',
                // width:'250',
                labelWidth:130,
                type:"yyyy-MM-dd",
                formslot:true,
              },{
                label: '差异金额',
                prop: 'differenceAmount',
                labelWidth:130,
                type:'input',
                formslot:true,
              },{
                label: '车站申诉原因',
                prop: 'appealReason',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                autoHeight: true,
                disabled:true,
              },
              //   {
              //   label: '超期申诉原因',
              //   prop: 'overtimeReason',
              //   // width:'250',
              //   labelWidth:130,
              //   hide:true,
              //   type:'textarea',
              //   disabled:true,
              // }
              {
                label: '车站备注',
                prop: 'remark',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                autoHeight: true,
                disabled:true,
              },{
                  label: "差异描述",
                  type: "textarea",
                  labelWidth: 130,
                  prop: "differenceDescription",
                  disabled:true
                },{
                label: '申诉收益回复',
                prop: 'appealReply',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '站长审核意见',
                prop: 'auditStationOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '车间票务专业审核意见',
                prop: 'auditWorkshopOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },{
                label: '部门票务专业审核意见',
                prop: 'auditDeptOpinion',
                // width:'250',
                labelWidth:130,
                type:'textarea',
                disabled:true,
              },
              // {
              //   label: '差异原因',
              //   prop: 'overtimeReason',
              //   // width:'250',
              //   labelWidth:130,
              //   type:'textarea',
              //   disabled:true,
              // }
              ]
            },
          ]
        };
      }
    },
    mounted() {
    }
  }
</script>
<style lang="scss">
  .huLianWangShouPiaojiDataInput.EditorOrAdd{
    .avue-group[index='2']{
      .avue-form__group{
        .avue-form__row{
          width: 100%;
        }
      }
    }
    @media only screen and (min-width: 992px){
      width: 100%;
    }
    .avue-crud__tip{
      display: none;
    }
  }
.zhanNeiRYDLCK {
  .upload-fujian{
    display: inline-flex;
    .el-upload-list {
      display: none;
    }
}

}
</style>
